home *** CD-ROM | disk | FTP | other *** search
/ PC Gamer (Italian) 28 / PC Gamer IT CD 28 1-2.iso / MEDIA / REVIEWS.DXR / Internal_1.ls < prev    next >
Encoding:
Text File  |  1997-12-01  |  5.5 KB  |  212 lines

  1. on startMovie
  2.   global DBfact, TBfact, gAlpha
  3.   if the machineType = 256 then
  4.     if the platform = "Windows,32" then
  5.       openXLib(the pathName & "XTRAS32\V12Dbe")
  6.       openXLib(the pathName & "XTRAS32\V12Table")
  7.       openXLib(the pathName & "XTRAS32\Fileio")
  8.       openXLib(the pathName & "XTRAS32\FileXtra")
  9.     else
  10.       openXLib(the pathName & "XTRAS16\V12Dbe")
  11.       openXLib(the pathName & "XTRAS16\V12Table")
  12.       openXLib(the pathName & "XTRAS16\Fileio")
  13.       openXLib(the pathName & "XTRAS16\FileXtra")
  14.     end if
  15.   else
  16.     openXLib(the pathName & "xtras:V12Dbe")
  17.     openXLib(the pathName & "xtras:V12Table")
  18.   end if
  19.   loadBrowser()
  20.   getPrefThingy()
  21.   loadBrowser()
  22.   set DBfact to xtra("V12Dbe")
  23.   set TBfact to xtra("V12Table")
  24.   set the visible of sprite 11 to 0
  25.   set the visible of sprite 12 to 0
  26.   set the visible of sprite 13 to 0
  27.   set the visible of sprite 14 to 0
  28.   set the visible of sprite 15 to 0
  29.   set the visible of sprite 16 to 0
  30.   set the visible of sprite 18 to 0
  31.   set the visible of sprite 19 to 0
  32.   set the visible of sprite 20 to 0
  33.   set the visible of sprite 21 to 0
  34.   set the visible of sprite 22 to 0
  35.   put "All Shareware" into field "fld"
  36.   set gAlpha to 1
  37.   put char gAlpha of field "alphaBet" into field "alphakey"
  38.   set the keyDownScript to "checkKeys"
  39. end
  40.  
  41. on checkKeys
  42.   if (the key = RETURN) or (the key = ENTER) then
  43.     set i to the key
  44.     put i
  45.     searchTitle()
  46.     dontPassEvent()
  47.   else
  48.     pass()
  49.   end if
  50. end
  51.  
  52. on searchTitle
  53.   global gTB
  54.   cursor(4)
  55.   puppetSound(1, "pioolb")
  56.   mSetCriteria(gTB, "appname", "Contains", field "searchFld")
  57.   mSelect(gTB)
  58.   set n to mSelectCount(gTB)
  59.   if n <> 0 then
  60.     put n into field "NumberFound"
  61.     put mGetField(gTB, "category") into field "category"
  62.     put mGetField(gTB, "appname") into field "appname"
  63.     put mGetField(gTB, "highs") into field "highs"
  64.     put mGetField(gTB, "lows") into field "lows"
  65.     put mGetField(gTB, "BottomLine") into field "BottomLine"
  66.     put mGetField(gTB, "Rating") into field "Rating"
  67.     put mGetField(gTB, "m/y/pg") into field "m/y/pg"
  68.     put mGetField(gTB, "AlphSortKey") into field "AlphSortKey"
  69.   else
  70.     byebye()
  71.   end if
  72.   showSelection()
  73.   go("db2")
  74.   cursor(-1)
  75. end
  76.  
  77. on complexSearch
  78.   global gTB
  79.   cursor(4)
  80.   puppetSound(1, "pioolb")
  81.   mSetCriteria(gTB, "appname", "contains", field "searchFld")
  82.   mSetCriteria(gTB, "and", "CoName", "contains", field "searchCo")
  83.   mSetCriteria(gTB, "and", "Rating", "contains", field "searchRating")
  84.   mSelect(gTB)
  85.   set n to mSelectCount(gTB)
  86.   if n <> 0 then
  87.     put n into field "NumberFound"
  88.     put mGetField(gTB, "appname") into field "appname"
  89.     put mGetField(gTB, "highs") into field "highs"
  90.     put mGetField(gTB, "lows") into field "lows"
  91.     put mGetField(gTB, "BottomLine") into field "BottomLine"
  92.     put mGetField(gTB, "Rating") into field "Rating"
  93.     put mGetField(gTB, "AlphSortKey") into field "AlphSortKey"
  94.   else
  95.     byebye()
  96.   end if
  97.   showSelection()
  98.   go("db2")
  99.   cursor(-1)
  100. end
  101.  
  102. on byebye
  103.   alert("No matching items were found.")
  104.   closeP()
  105.   openDB()
  106.   showSelection()
  107.   go("db2")
  108. end
  109.  
  110. on stopMovie
  111.   global gTB, gDb
  112.   set gTB to 0
  113.   set gDb to 0
  114. end
  115.  
  116. on showInstall
  117.   set spriteNum to castspritea("Install")
  118.   puppetSound(2, 0)
  119.   puppetSound(2, "blooip")
  120.   puppetSprite(spriteNum, 1)
  121.   repeat with index = -8 to 8
  122.     set pos to index * 40
  123.     set the locH of sprite spriteNum to pos
  124.     updateStage()
  125.   end repeat
  126. end
  127.  
  128. on hideInstall
  129.   set spriteNum to castspritea("Install")
  130.   if the locH of sprite spriteNum <> 320 then
  131.     exit
  132.   end if
  133.   puppetSound(2, 0)
  134.   puppetSound(2, "pioolb")
  135.   puppetSprite(spriteNum, 1)
  136.   repeat with index = 8 down to -8
  137.     set pos to index * 40
  138.     set the locH of sprite spriteNum to pos
  139.     updateStage()
  140.   end repeat
  141. end
  142.  
  143. on doPopMenu spriteNum, h, v
  144.   set the visible of sprite spriteNum to 1
  145.   set the locH of sprite spriteNum to h
  146.   set the locV of sprite spriteNum to v
  147.   updateStage()
  148.   set cNum to the castNum of sprite spriteNum
  149.   set lastSelection to 0
  150.   set len to the number of lines in field cNum
  151.   repeat while the stillDown
  152.     set mc to the mouseLine
  153.     if (0 < mc) and (mc <= len) and rollOver(spriteNum) then
  154.       if mc <> lastSelection then
  155.         set lastSelection to mc
  156.         hilite line mc of field cNum
  157.         updateStage()
  158.       end if
  159.       next repeat
  160.     end if
  161.     if mc <> lastSelection then
  162.       set lastSelection to -1
  163.       hilite line len + 1 of field cNum
  164.       updateStage()
  165.     end if
  166.   end repeat
  167.   set the visible of sprite spriteNum to 0
  168.   set the visible of sprite 47 to 0
  169.   updateStage()
  170.   if line lastSelection of field cNum <> EMPTY then
  171.     return lastSelection
  172.   else
  173.     return -1
  174.   end if
  175. end
  176.  
  177. on TrackClick
  178.   set spriteNum to the clickOn
  179.   set offCast to the castNum of sprite spriteNum
  180.   set onCast to offCast + 1
  181.   set the castNum of sprite spriteNum to onCast
  182.   updateStage()
  183.   repeat while the mouseDown
  184.     if rollOver(spriteNum) then
  185.       set the castNum of sprite spriteNum to onCast
  186.     else
  187.       set the castNum of sprite spriteNum to offCast
  188.     end if
  189.     updateStage()
  190.   end repeat
  191.   set the castNum of sprite spriteNum to offCast
  192.   updateStage()
  193.   return rollOver(spriteNum)
  194. end
  195.  
  196. on loadBrowser
  197.   global myFile
  198.   set gOSDir to getOSDirectory()
  199.   put gOSDir & "\" into field "OSPath"
  200.   put gOSDir & "\BROWSER.TXT" into field "ThePath"
  201.   set DaPath to field "ThePath"
  202.   if objectp(myFile) then
  203.     set myFile to 0
  204.   end if
  205.   set myFile to new(xtra("fileio"))
  206.   openFile(myFile, DaPath, 1)
  207.   set TheWeb to readLine(myFile)
  208.   put TheWeb into field "browserSelect"
  209.   closeFile(myFile)
  210.   set myFile to 0
  211. end
  212.